package org.redrider.shop.domain
class PartsOrder {
    Float totalCost
    OrderStatus status
    static transients = ['totalCost']
    static hasMany = [partsSplits:PartsOrderSplits]
    static belongsTo = [hMapper:HistoryMapper]
    static constraints = {

    }



    Float getTotalCost(){
        Float tot
        partsSplits.each {
            tot += it.price
        }
        return tot
    }
}
